﻿using Ivory;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Ivory.GUI;
using Ivory.Libs;
using X13.Player;
using X13.Mapping;
using X13.Libs;
using X13;

namespace Sweeper
{
    using XGlobals = X13.Globals;    

    public class RenderTest02 : RenderTestBase
    {
        public static string Key = "~RT02nm";
        
        //Fields
        private GUI _GUI;
        private Minefield _Minefield;

        //Construct
        public RenderTest02(Game game)
            : base(game)
        {

        }

        //Methods 
        public override void RenderTest(SpriteBatch batch, GameTime time)
        {
            _Minefield.DrawMinefield();
        }
        public override void UpdateTest(GameTime time, InputControl input)
        {
            _Minefield.UpdateMinefield();
        }
        public override void LoadTest()
        {
            int[,] data = new int[5, 5]
            {
                {0,0,0,0,0},
                {0,0,0,0,0},
                {0,0,0,0,0},
                {0,0,0,0,0},
                {0,0,0,0,0},
            };

            _Minefield = new Minefield(Game, data);
            SelectionEngine.RegisterRange(_Minefield);
        }
    }
}
